package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.DevCodeIccDao;
import com.sugon.entity.DevCodeIccEntity;
import com.sugon.service.DevCodeIccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 设备ICC代码维护Service实现类
 *
 * @author sugon
 * @date 2019-07-15 11:28:13
 */
@Service("devCodeIccService")
public class DevCodeIccServiceImpl implements DevCodeIccService {
    /**
     *
     */
    @Autowired
    private DevCodeIccDao devCodeIccDao;

    /**
     * queryObject
     *
     * @param id 主键
     * @return
     */
    @Override
    public DevCodeIccEntity queryObject(String id) {
        return devCodeIccDao.queryObject(id);
    }

    /**
     * queryList
     *
     * @param map 参数
     * @return
     */
    @Override
    public List<DevCodeIccEntity> queryList(Map<String, Object> map) {
        return devCodeIccDao.queryList(map);
    }

    /**
     * queryTotal
     *
     * @param map 参数
     * @return
     */
    @Override
    public int queryTotal(Map<String, Object> map) {
        return devCodeIccDao.queryTotal(map);
    }

    /**
     * save
     *
     * @param devCodeIcc 实体
     * @return
     */
    @Override
    public int save(DevCodeIccEntity devCodeIcc) {
        devCodeIcc.setId(RandomUtil.randomString(32));
        return devCodeIccDao.save(devCodeIcc);
    }

    /**
     * update
     *
     * @param devCodeIcc 实体
     * @return
     */
    @Override
    public int update(DevCodeIccEntity devCodeIcc) {
        return devCodeIccDao.update(devCodeIcc);
    }

    /**
     * delete
     *
     * @param id
     * @return
     */
    @Override
    public int delete(String id) {
        return devCodeIccDao.delete(id);
    }

    /**
     * deleteBatch
     *
     * @param ids
     * @return
     */
    @Override
    public int deleteBatch(String[] ids) {
        return devCodeIccDao.deleteBatch(ids);
    }

}
